package com.gopay.common.domain.oldmermove;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.gopay.common.constants.oldmermove.OldMerIdentityCodeStatus;

/**
 * 旧平台商户识别码对象<br>
 * 当为企业直付类交易（有单独的识别码）或多账户情况，会使用该对象
 * @OldMovedMerIdentityCode.java
 * @author zhangjunyu
 * @2014-10-21 下午4:20:08 www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "OLD_MOVED_MER_IDENTITY_CODE")
public class OldMovedMerIdentityCode implements Serializable {

	private static final long serialVersionUID = 3871140150119241679L;
	
	private OldMovedMerIdentityCodeId id;
	private String newMerId;
	private String oldIdentityCode;
	private OldMerIdentityCodeStatus status;

	@EmbeddedId
    @AttributeOverrides({
            @AttributeOverride(name = "oldMerId", column = @Column(name = "OLD_MER_ID", nullable = false, length = 10)),
            @AttributeOverride(name = "gateWayType", column = @Column(name = "GATEWAY_TYPE", nullable = false)) })
	public OldMovedMerIdentityCodeId getId() {
		return id;
	}

	public void setId(OldMovedMerIdentityCodeId id) {
		this.id = id;
	}

	@Column(name = "NEW_MER_ID", nullable = false, length = 10)
	public String getNewMerId() {
		return newMerId;
	}

	public void setNewMerId(String newMerId) {
		this.newMerId = newMerId;
	}

	@Column(name = "OLD_IDENTITY_CODE", nullable = false)
	public String getOldIdentityCode() {
		return oldIdentityCode;
	}

	public void setOldIdentityCode(String oldIdentityCode) {
		this.oldIdentityCode = oldIdentityCode;
	}

	@Column(name = "STATUS", nullable = false)
	@Enumerated(EnumType.ORDINAL)
	public OldMerIdentityCodeStatus getStatus() {
		return status;
	}

	public void setStatus(OldMerIdentityCodeStatus status) {
		this.status = status;
	}
}
